An E2E test for @clickhouse/client package beta version#1553
An E2E test for @clickhouse/client package beta version#1553peter-leonov-ch wants to merge 5 commits into
@clickhouse/client package beta version#1553Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
PR Review✅ No critical issues found. Notes:
Recommendations for testing:
Since this is a test PR for QA purposes, CI validation is the primary concern. |
E2E Test Results✅ All tests passed • 221 passed • 3 skipped • 1408s
Tests ran across 4 shards in parallel. |
a465b8e to
7cdb8fc
Compare
ae508f4 to
e15c096
Compare
@clickhouse/client package beta version
e15c096 to
0334d2e
Compare
There was a problem hiding this comment.
Code Review
⚠️ Note: The PR description explicitly states DO NOT MERGE — this is an E2E compatibility test for the@clickhouse/clientrelease cycle.
Changes reviewed: packages/common-utils/package.json and yarn.lock — bumping @clickhouse/client, @clickhouse/client-common, and @clickhouse/client-web from ^1.12.1 → beta (resolves to 1.18.2).
- ❌
"beta"is a floating dist-tag, not a pinned version → if/when merged to production, replace with an explicit version (e.g."^1.18.2") to avoid surprise breakage from future beta publishes ⚠️ yarn.lockresolution looks correct (all three packages resolve to1.18.2) — no mismatch issues
✅ No logic changes; the only code touched is the dependency version specifier and the generated lockfile. Acceptable as a temporary CI compatibility test PR as intended.
|
@copilot rebase this PR and then set the tested version to |
93c1ae5 to
2dc399d
Compare
|
@claude Rebase this PR, run yarn and push the changes. |
|
Claude encountered an error —— View job Rebasing and updating dependencies
|
2dc399d to
bc1f8c9
Compare
d6149a9 to
173f23f
Compare
173f23f to
b8f1a3a
Compare
b8f1a3a to
6b699a1
Compare
6b699a1 to
c84dc47
Compare
c84dc47 to
62a6364
Compare
62a6364 to
60fefc5
Compare
78a3ba1 to
bbd7291
Compare
bbd7291 to
49b48d1
Compare
Greptile SummaryThis is an intentionally short-lived, "DO NOT MERGE" CI integration PR that upgrades all
Confidence Score: 4/5Not safe to merge — the PR is explicitly labelled DO NOT MERGE and is intended solely as a transient CI probe for the ClickHouse JS client release pipeline. The .yarnrc.yml — the wildcard Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["processClickhouseSettings()\n(BaseClickhouseClient)\nreturns client-common ClickHouseSettings"] -->|"structurally identical\nbut nominally distinct\nsince v1.23"| B["neutralSettings\n(client-common type)"]
B -->|"as ClickHouseSettings\n(eslint-disable: no-unsafe-type-assertion)"| C["clickhouseSettings\n(platform-specific type)"]
C --> D["client.query({ clickhouse_settings: clickhouseSettings })"]
subgraph node["node.ts / ProxyClickhouseClient"]
N1["@clickhouse/client\nself-bundles ClickHouseSettings"]
end
subgraph web["browser.ts"]
W1["@clickhouse/client-web\nself-bundles ClickHouseSettings"]
end
D --> node
D --> web
E["@clickhouse/client-common\n(explicit dep, head → 1.23.0)"] -->|"produces"| A
E -.->|"bundled copy in"| N1
E -.->|"bundled copy in"| W1
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A["processClickhouseSettings()\n(BaseClickhouseClient)\nreturns client-common ClickHouseSettings"] -->|"structurally identical\nbut nominally distinct\nsince v1.23"| B["neutralSettings\n(client-common type)"]
B -->|"as ClickHouseSettings\n(eslint-disable: no-unsafe-type-assertion)"| C["clickhouseSettings\n(platform-specific type)"]
C --> D["client.query({ clickhouse_settings: clickhouseSettings })"]
subgraph node["node.ts / ProxyClickhouseClient"]
N1["@clickhouse/client\nself-bundles ClickHouseSettings"]
end
subgraph web["browser.ts"]
W1["@clickhouse/client-web\nself-bundles ClickHouseSettings"]
end
D --> node
D --> web
E["@clickhouse/client-common\n(explicit dep, head → 1.23.0)"] -->|"produces"| A
E -.->|"bundled copy in"| N1
E -.->|"bundled copy in"| W1
Reviews (6): Last reviewed commit: "Drop unused @clickhouse/client-common de..." | Re-trigger Greptile |
| "@clickhouse/client": "head", | ||
| "@clickhouse/client-common": "head", | ||
| "@clickhouse/client-web": "head", |
There was a problem hiding this comment.
head dist-tag is not reproducible after lockfile refresh
All three @clickhouse packages (and the same pattern in packages/cli/package.json and packages/hdx-eval/package.json) are pinned to the head dist-tag. The current yarn.lock does freeze the resolution to 1.21.0-head.68dd619.1, but if anyone runs yarn with --no-immutable or equivalent, the tag will re-resolve to whatever the ClickHouse team has published under head at that moment, silently changing the dependency without a version bump. This is fine as a deliberately short-lived CI test, but would be a reproducibility hazard on main.
220ea89 to
8751e61
Compare
… 1.23 (#2500) ## Summary Discovered in: * #1553 by @peter-leonov-ch In `@clickhouse/client*` 1.23, `@clickhouse/client-common` is deprecated: `@clickhouse/client` (Node) and `@clickhouse/client-web` (Web) no longer depend on it — each now bundles and re-exports its own copy of the shared types. This repo imported *types* from `client-common` but got its *runtime* from the platform packages, so under 1.23 the two same-named `ClickHouseSettings` aliases become distinct nominal types (their index signature references a private-membered `SettingsMap` class), breaking the `common-utils` declaration build and cascading into every downstream job. This change repoints imports so each file's ClickHouse **types** come from the **same platform package** as its **runtime**, making the repo compile against both the current pin and 1.23. **No `@clickhouse/client*` version bumps** — the actual upgrade can land later with no further code changes. - **Type imports → platform package** - `clickhouse/browser.ts` (web runtime) → `@clickhouse/client-web` - `clickhouse/node.ts` (node runtime) → `@clickhouse/client` - `__tests__/clickhouse.test.ts`, `metadata.int.test.ts`, `queryChartConfig.int.test.ts` → `@clickhouse/client` (matches the client they instantiate; also clears the `clientClickHouseSettings` private-property errors) - `packages/cli/src/api/client.ts` → `@clickhouse/client`; dropped the now-unused `@clickhouse/client-common` dep from cli `package.json` - **Intentionally retained on `client-common`** — `clickhouse/index.ts` and `core/metadata.ts`. These are cross-platform/barrel modules, and `ResponseHeaders` is **not** re-exported by the platform packages at the pinned 1.12.1, so migrating them would break the current build. This is the only remaining (justified) `client-common` usage. - **Shared base-class bridge** — import swaps alone don't suffice for 1.23: `BaseClickhouseClient` feeds one platform-neutral settings object into both a `WebClickHouseClient | NodeClickHouseClient` union and both subclasses, whose settings types diverge under 1.23. Bridged with a single typed `getClient()` override per subclass plus a neutral→platform cast on `processClickhouseSettings()` — type-only, following the file's existing `// client library type mismatch` convention. ```ts // node.ts — subclass narrows the base class's platform-agnostic client once protected getClient(): NodeClickHouseClient { // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- subclass always builds a node client return super.getClient() as NodeClickHouseClient; } ``` The only lockfile delta is the cli `client-common` removal; no version entries change. ### Screenshots or video N/A — non-UI change. ### How to test on Vercel preview N/A — non-UI change. ### References - Linear Issue: - Related PRs: #1553 (experimental 1.23 bump that surfaced the failure; not landing)
8751e61 to
6e50bb9
Compare
Temporary release-test patch — remove once the upstream @clickhouse/client* fix is negotiated (a genuinely package-neutral settings type, or a structural SettingsMap). @clickhouse/client* 1.23 (resolved via the `head` dist-tag) makes each platform package bundle its own copy of the shared types, so their ClickHouseSettings — which reference the nominally-compared SettingsMap class — diverge from @clickhouse/client-common's. The shared processClickhouseSettings() helper produces the client-common flavor, breaking tsc (TS2322) and the no-unsafe-type-assertion lint rule at the per-platform query() boundaries. Bridge with guarded `as ClickHouseSettings` assertions in node.ts / browser.ts (matching the existing "client library type mismatch" pattern), and add the getClient() node-narrowing override to the cli proxy client that node.ts already has (without it, query() saw the node|web union's unsatisfiable settings intersection). No runtime behavior changes.
knip flagged it as unused: the cli package imports only from @clickhouse/client and @hyperdx/common-utils, never from @clickhouse/client-common directly. (main does not pin it in cli either; common-utils still pins all three.)



Warning
DO NOT MERGE
This PR is not meant to be merged, it's an e2e test for the
@clickhouse/clientpackage release cycleWhy
HDX is a heavy CH JS client user. For the mutual benefit let's test CH JS releases as part of the CH JS QA process.
What
Bumping the client version and checking the CI checks.
CH JS team is going to update this PR with beta versions of CH JS package during the release cycle.